home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-04-06 | 69.4 KB | 2,601 lines |
- Service : BC_ASC2INT
-
- Module : Base Conversion Services
-
- Compat : Any
-
- Purpose : Converts an ASCIIZ string to an unsigned integer
-
- Parms:
- BL <-- base from which to convert (2-36)
- DS:SI <-- pointer to string
- -------
- AX = unsigned integer (0-65,535)
-
- Description:
-
- The BC_ASC2INT service converts an ASCIIZ string to an unsigned integer
- value. The conversion stops at the first character which cannot be construed
- as being part of the number.
-
- Any reasonable base may be specified, giving this service considerable
- flexibility. More commonly-used bases include:
-
- 2 binary
- 8 octal
- 10 decimal
- 16 hex
-
-
-
-
- Service : BC_ASC2LONG
-
- Module : Base Conversion Services
-
- Compat : Any
-
- Purpose : Converts an ASCIIZ string to an unsigned long integer
-
- Parms:
- BL <-- base from which to convert (2-36)
- DS:SI <-- pointer to string
- -------
- DX,AX = unsigned long integer (0-4,294,967,295)
-
- Description:
-
- The BC_ASC2LONG service converts an ASCIIZ string to an unsigned long integer
- value. The conversion stops at the first character which cannot be construed
- as being part of the number.
-
- Any reasonable base may be specified, giving this service considerable
- flexibility. More commonly-used bases include:
-
- 2 binary
- 8 octal
- 10 decimal
- 16 hex
-
- Service : BC_ASC2SINT
-
- Module : Base Conversion Services
-
- Compat : Any
-
- Purpose : Converts an ASCIIZ string to a signed integer
-
- Parms:
- BL <-- base from which to convert (2-36)
- DS:SI <-- pointer to string
- -------
- AX = unsigned integer (-32768 to 32767)
-
- Description:
-
- The BC_ASC2SINT service converts an ASCIIZ string to a signed integer value.
- The conversion stops at the first character which cannot be construed as
- being part of the number.
-
- Any reasonable base may be specified, giving this service considerable
- flexibility. More commonly-used bases include:
-
- 2 binary
- 8 octal
- 10 decimal
- 16 hex
-
- Note that negative numbers are frequently represented as unsigned numbers
- when a base other than 10 (decimal) is used. If you wish to follow that
- convention, simply use BC_ASC2INT instead of this routine.
-
- Service : BC_ASC2SLONG
-
- Module : Base Conversion Services
-
- Compat : Any
-
- Purpose : Converts an ASCIIZ string to a signed long integer
-
- Parms:
- BL <-- base from which to convert (2-36)
- DS:SI <-- pointer to string
- -------
- DX,AX = signed long integer (-2,147,483,648 to 2,147,483,647)
-
- Description:
-
- The BC_ASC2SLONG service converts an ASCIIZ string to a signed long integer
- value. The conversion stops at the first character which cannot be construed
- as being part of the number.
-
- Any reasonable base may be specified, giving this service considerable
- flexibility. More commonly-used bases include:
-
- 2 binary
- 8 octal
- 10 decimal
- 16 hex
-
- Note that negative numbers are frequently represented as unsigned numbers
- when a base other than 10 (decimal) is used. If you wish to follow that
- convention, simply use BC_ASC2LONG instead of this routine.
-
- Service : BC_INT2ASC
-
- Module : Base Conversion Services
-
- Compat : Any
-
- Purpose : Converts an unsigned integer to an ASCIIZ string
-
- Parms:
- AX <-- unsigned integer (0-65,535)
- BL <-- desired base (2-36)
- ES:DI <-- pointer to string buffer (recommend 17 bytes)
-
- Description:
-
- The BC_INT2ASC service converts an integer value to an ASCIIZ number of a
- specified base. The integer is presumed to be unsigned, giving a range of
- 0-65,535.
-
- More commonly-used bases include:
-
- 2 binary
- 8 octal
- 10 decimal
- 16 hex
-
-
-
-
- Service : BC_LONG2ASC
-
- Module : Base Conversion Services
-
- Compat : Any
-
- Purpose : Converts an unsigned long integer to an ASCIIZ string
-
- Parms:
- DX,AX <-- unsigned long integer (0-4,294,967,295)
- BL <-- desired base (2-36)
- ES:DI <-- pointer to string buffer (recommend 33 bytes)
-
- Description:
-
- The BC_LONG2ASC service converts an unsigned long integer value to an ASCIIZ
- number of a specified base.
-
- More commonly-used bases include:
-
- 2 binary
- 8 octal
- 10 decimal
- 16 hex
-
- Service : BC_SINT2ASC
-
- Module : Base Conversion Services
-
- Compat : Any
-
- Purpose : Converts a signed integer to an ASCIIZ string
-
- Parms:
- AX <-- signed integer (-32768 to 32767)
- BL <-- desired base (2-36)
- ES:DI <-- pointer to string buffer (recommend 18 bytes)
-
- Description:
-
- The BC_SINT2ASC service converts an integer value to an ASCIIZ number of a
- specified base. The integer is presumed to be signed, giving a range of
- -32,768 to 32,767.
-
- More commonly-used bases include:
-
- 2 binary
- 8 octal
- 10 decimal
- 16 hex
-
- Note that negative numbers are frequently represented as unsigned numbers
- when a base other than 10 (decimal) is used. If you wish to follow that
- convention, simply use BC_INT2ASC instead of this routine.
-
- Service : BC_SLONG2ASC
-
- Module : Base Conversion Services
-
- Compat : Any
-
- Purpose : Converts a signed long integer to an ASCIIZ string
-
- Parms:
- DX,AX <-- signed long integer (-2,147,483,648 to 2,147,483,647)
- BL <-- desired base (2-36)
- ES:DI <-- pointer to string buffer (recommend 34 bytes)
-
- Description:
-
- The BC_SLONG2ASC service converts a signed long integer value to an ASCIIZ
- number of a specified base.
-
- More commonly-used bases include:
-
- 2 binary
- 8 octal
- 10 decimal
- 16 hex
-
- Note that negative numbers are frequently represented as unsigned numbers
- when a base other than 10 (decimal) is used. If you wish to follow that
- convention, simply use BC_LONG2ASC instead of this routine.
-
- Service : BV_CHROUT
-
- Module : BIOS Video Services
-
- Compat : BIOS
-
- Purpose : Displays a character on the screen
-
- Parms:
- AL <-- character to display
-
- Description:
-
- The BV_CHROUT routine displays a character on the screen.
-
- The following control codes are interpreted:
- 7 Bell beep
- 8 Backspace non-destructive backspace
- 9 Tab space over to the next tab stop
- 10 Linefeed move cursor down one line, scrolling as needed
- 12 Formfeed clear screen and home cursor
- 13 Carriage Return home cursor on current line
-
- Redirection, if any, is ignored. Most windowing multitaskers will be able to
- keep the output from this service in a window.
-
-
-
-
- Service : BV_CLEOLN
-
- Module : BIOS Video Services
-
- Compat : BIOS
-
- Purpose : Clears to the end of the line
-
- Parms:
- none
-
- Description:
-
- The BV_CLEOLN service clears from the current cursor position to the end of
- the current screen line, inclusive.
-
- Redirection, if any, is ignored. Most windowing multitaskers will be able to
- keep the output from this service in a window.
-
- Service : BV_CLS
-
- Module : BIOS Video Services
-
- Compat : BIOS
-
- Purpose : Clears the screen
-
- Parms:
- none
-
- Description:
-
- The BV_CLS service clears the screen and homes the cursor to the upper left
- corner.
-
- Redirection, if any, is ignored. Most windowing multitaskers will be able to
- keep the output from this service in a window.
-
-
-
-
- Service : BV_COLOR
-
- Module : BIOS Video Services
-
- Compat : BIOS
-
- Purpose : Sets the default text color
-
- Parms:
- AL <-- default color
-
- Description:
-
- The BV_COLOR service sets the default text color. A color/attribute table is
- given in the ASMWIZ.DOC file. In general, however, the background is in the
- high nybble and ranges 0-7 in text modes, 0 in graphics modes; the foreground
- is in the low nybble and ranges 0-7 in text modes, 0-x in graphics modes.
-
- Redirection, if any, is ignored. Most windowing multitaskers will be able to
- keep the output from this service in a window.
-
- Service : BV_CRLF
-
- Module : BIOS Video Services
-
- Compat : BIOS
-
- Purpose : Displays a <CR><LF> (carriage return and linefeed)
-
- Parms:
- none
-
- Description:
-
- The BV_CRLF routine displays a carriage return and linefeed on the screen.
-
- Redirection, if any, is ignored. Most windowing multitaskers will be able to
- keep the output from this service in a window.
-
-
-
-
- Service : BV_DELLINE
-
- Module : BIOS Video Services
-
- Compat : BIOS
-
- Purpose : Deletes the current screen row
-
- Parms:
- none
-
- Description:
-
- The BV_DELLINE service deletes the row on which the cursor is placed. Any
- rows beneath it are moved up and the bottom line of the screen is cleared to
- a row of spaces in the current screen colors.
-
- Redirection, if any, is ignored. Most windowing multitaskers will be able to
- keep the output from this service in a window.
-
- Service : BV_GETCOLOR
-
- Module : BIOS Video Services
-
- Compat : BIOS
-
- Purpose : Gets the default text color
-
- Parms:
- -------
- AL = default color
-
- Description:
-
- The BV_GETCOLOR service gets the default text color. A color/attribute table
- is given in the ASMWIZ.DOC file. In general, however, the background is in
- the high nybble and ranges 0-7 in text modes, 0 in graphics modes; the
- foreground is in the low nybble and ranges 0-7 in text modes, 0-x in graphics
- modes.
-
- Redirection, if any, is ignored. Most windowing multitaskers will be able to
- keep the output from this service in a window.
-
-
-
-
- Service : BV_HIDECURSOR
-
- Module : BIOS Video Services
-
- Compat : BIOS
-
- Purpose : Hides the cursor
-
- Parms:
- none
-
- Description:
-
- The BV_HIDECURSOR service hides the cursor, making it invisible. This does
- not affect normal cursor operation.
-
- Redirection, if any, is ignored. Most windowing multitaskers will be able to
- keep the output from this service in a window.
-
- Service : BV_INSLINE
-
- Module : BIOS Video Services
-
- Compat : BIOS
-
- Purpose : Inserts a line at the current screen row
-
- Parms:
- none
-
- Description:
-
- The BV_INSLINE service inserts a row at the current cursor location. Any
- rows beneath it are moved down and the new line screen is cleared to a row of
- spaces in the current screen colors.
-
- Redirection, if any, is ignored. Most windowing multitaskers will be able to
- keep the output from this service in a window.
-
-
-
-
- Service : BV_LOCATE
-
- Module : BIOS Video Services
-
- Compat : BIOS
-
- Purpose : Sets the cursor position
-
- Parms:
- DH <-- row (1-25)
- DL <-- column (1-40/80)
-
- Description:
-
- The BV_LOCATE service sets the cursor position.
-
- Redirection, if any, is ignored. Most windowing multitaskers will be able to
- keep the output from this service in a window.
-
- Service : BV_MODE
-
- Module : BIOS Video Services
-
- Compat : BIOS
-
- Purpose : Sets the screen mode
-
- Parms:
- AL <-- screen mode (0-7, 13-19, depending on video adapter)
-
- Description:
-
- The BV_MODE routine sets the screen mode. This may be any of the following:
-
- Mode Resolu. Type Colr Use Adapter(s)
-
- 0 40x25 b&w 16 text CGA, EGA, VGA
- 1 40x25 color 16 text CGA, EGA, VGA
- 2 80x25 b&w 16 text CGA, EGA, VGA
- def- 3 80x25 color 16 text CGA, EGA, VGA
- 4 320x200 color 4 graphics CGA, EGA, VGA
- 5 320x200 b&w 4 graphics CGA, EGA, VGA
- 6 640x200 color 2 graphics CGA, EGA, VGA
- mda- 7 80x25 b&w - text MDA, EGA, VGA
- 13 320x200 color 16 graphics EGA, VGA
- 14 640x200 color 16 graphics EGA, VGA
- 15 640x350 mono - graphics EGA, VGA
- 16 640x350 color 16 graphics EGA, VGA
- 17 640x480 color 2 graphics VGA
- 18 640x480 color 16 graphics VGA
- 19 320x200 color 256 graphics VGA
-
- Redirection, if any, is ignored. Most windowing multitaskers will be able to
- keep the output from this service in a window.
-
- Service : BV_POPUP
-
- Module : BIOS Video Services
-
- Compat : BIOS
-
- Purpose : Displays a pop-up window on the screen
-
- Parms:
- DS:DX <-- pointer to parameter list
-
- Description:
-
- The BV_POPUP service displays a pop-up window on the screen. A variety of
- frames is available for the window. Titles are optional and will be left-
- justified in the top bar of the window if supplied.
-
- Frame types are as follows:
-
- 0 none (blank)
- 1 single lines
- 2 double lines
- 3 single horizontal lines, double vertical lines
- 4 double horizontal lines, single vertical lines
-
- The parameter list should look like this:
-
- Y1 db ? ; top row of window
- X1 db ? ; left column of window
- Y2 db ? ; bottom row of window
- X2 db ? ; right column of window
- FRAMETYPE db ? ; frame type
- FRAMECOLOR db ? ; frame color
- TITLE dw ? ; offset (from DS:) of ASCIIZ title
- ; use 0FFFFh instead if no title is desired
-
- Redirection, if any, is ignored. Most windowing multitaskers will be able to
- keep the output from this service in a window.
-
- Service : BV_SHOWCURSOR
-
- Module : BIOS Video Services
-
- Compat : BIOS
-
- Purpose : Shows the cursor
-
- Parms:
- none
-
- Description:
-
- The BV_SHOWCURSOR service shows the cursor, making it visible. NOTE: This
- service may change the cursor shape if used before BV_HIDECURSOR.
-
- Redirection, if any, is ignored. Most windowing multitaskers will be able to
- keep the output from this service in a window.
-
-
-
-
- Service : BV_STROUT
-
- Module : BIOS Video Services
-
- Compat : BIOS
-
- Purpose : Displays a string on the screen
-
- Parms:
- DS:DX <-- ptr to string to display
-
- Description:
-
- The BV_STROUT routine displays a string on the screen. The string must be in
- ASCIIZ format (NUL terminated).
-
- The following control codes are interpreted:
- 7 Bell beep
- 8 Backspace non-destructive backspace
- 9 Tab space over to the next tab stop
- 10 Linefeed move cursor down one line, scrolling as needed
- 12 Formfeed clear screen and home cursor
- 13 Carriage Return home cursor on current line
-
- Redirection, if any, is ignored. Most windowing multitaskers will be able to
- keep the output from this service in a window.
-
- Service : BV_WHERE
-
- Module : BIOS Video Services
-
- Compat : BIOS
-
- Purpose : Gets the cursor position
-
- Parms:
- -------
- DH = row (1-25)
- DL = column (1-40/80)
-
- Description:
-
- The BV_WHERE service gets the cursor position.
-
- Redirection, if any, is ignored. Most windowing multitaskers will be able to
- keep the output from this service in a window.
-
- Service : CG_CHROUT
-
- Module : CGA Graphics Services
-
- Compat : Clone
-
- Purpose : Displays a character on the screen
-
- Parms:
- AL <-- character to display
-
- Description:
-
- The CG_CHROUT routine displays a character on the screen. The screen must be
- in one of the CGA graphics modes (video modes 4-6).
-
- The following control codes are interpreted:
- 7 Bell beep
- 8 Backspace non-destructive backspace
- 9 Tab space over to the next tab stop
- 10 Linefeed move cursor down one line, scrolling as needed
- 12 Formfeed clear screen and home cursor
- 13 Carriage Return home cursor on current line
-
- Redirection, if any, is ignored. Few windowing multitaskers will be able to
- keep the output from this service in a window.
-
-
-
-
- Service : CG_CLEOLN
-
- Module : CGA Graphics Services
-
- Compat : Clone
-
- Purpose : Clears to the end of the line
-
- Parms:
- none
-
- Description:
-
- The CG_CLEOLN service clears from the current cursor position to the end of
- the current screen line, inclusive. The screen must be in one of the CGA
- graphics modes (video modes 4-6).
-
- Redirection, if any, is ignored. Few windowing multitaskers will be able to
- keep the output from this service in a window.
-
- Service : CG_CLS
-
- Module : CGA Graphics Services
-
- Compat : Clone
-
- Purpose : Clears the screen
-
- Parms:
- none
-
- Description:
-
- The CG_CLS service clears the screen and homes the cursor to the upper left
- corner. The screen must be in one of the CGA graphics modes (video modes
- 4-6).
-
- Redirection, if any, is ignored. Few windowing multitaskers will be able to
- keep the output from this service in a window.
-
-
-
-
- Service : CG_COLOR
-
- Module : CGA Graphics Services
-
- Compat : Clone
-
- Purpose : Sets the default text color
-
- Parms:
- AL <-- default color
-
- Description:
-
- The CG_COLOR service sets the default text color. A color/attribute table is
- given in the ASMWIZ.DOC file. In general, however, the background is in the
- high nybble and ranges 0-3; the foreground is in the low nybble and also
- ranges 0-3. The actual colors displayed depend on the palette setting.
-
- Redirection, if any, is ignored. Few windowing multitaskers will be able to
- keep the output from this service in a window.
-
- Service : CG_CRLF
-
- Module : CGA Graphics Services
-
- Compat : Clone
-
- Purpose : Displays a <CR><LF> (carriage return and linefeed)
-
- Parms:
- none
-
- Description:
-
- The CG_CRLF routine displays a carriage return and linefeed on the screen.
- The screen must be in one of the CGA graphics modes (video modes 4-6).
-
- Redirection, if any, is ignored. Few windowing multitaskers will be able to
- keep the output from this service in a window.
-
-
-
-
- Service : CG_GETCOLOR
-
- Module : CGA Graphics Services
-
- Compat : Clone
-
- Purpose : Gets the default text color
-
- Parms:
- -------
- AL = default color
-
- Description:
-
- The CG_GETCOLOR service gets the default text color. A color/attribute table
- is given in the ASMWIZ.DOC file. In general, however, the background is in
- the high nybble and ranges 0-3; the foreground is in the low nybble and also
- ranges 0-3. The actual colors displayed depend on the palette setting.
-
- Redirection, if any, is ignored. Few windowing multitaskers will be able to
- keep the output from this service in a window.
-
- Service : CG_INIT
-
- Module : CGA Graphics Services
-
- Compat : Clone
-
- Purpose : Initializes the CGA Graphics Services
-
- Parms:
- none
-
- Description:
-
- The CG_INIT routine initializes the CGA Graphics Services. It should be used
- once in your program, before any other CGA Graphics Services are called.
-
- Redirection, if any, is ignored. Few windowing multitaskers will be able to
- keep the output from this service in a window.
-
-
-
-
- Service : CG_LOCATE
-
- Module : CGA Graphics Services
-
- Compat : Clone
-
- Purpose : Sets the cursor position
-
- Parms:
- DH <-- row (1-25)
- DL <-- column (1-40/80)
-
- Description:
-
- The CG_LOCATE service sets the cursor position. The screen must be in one of
- the CGA graphics modes (video modes 4-6).
-
- Redirection, if any, is ignored. Few windowing multitaskers will be able to
- keep the output from this service in a window.
-
- Service : CG_MODE
-
- Module : CGA Graphics Services
-
- Compat : Clone
-
- Purpose : Sets the screen mode
-
- Parms:
- AL <-- screen mode (4-6)
-
- Description:
-
- The CG_MODE routine sets the screen mode. This may be any of the following:
-
- Mode Resolu. Type Colr Use Adapter(s)
-
- 4 320x200 color 4 graphics CGA, EGA, VGA
- 5 320x200 b&w 4 graphics CGA, EGA, VGA
- 6 640x200 color 2 graphics CGA, EGA, VGA
-
- Redirection, if any, is ignored. Few windowing multitaskers will be able to
- keep the output from this service in a window.
-
-
-
-
- Service : CG_STROUT
-
- Module : CGA Graphics Services
-
- Compat : Clone
-
- Purpose : Displays a string on the screen
-
- Parms:
- DS:DX <-- ptr to the string to display
-
- Description:
-
- The CG_STROUT routine displays a string on the screen. The string must be in
- ASCIIZ (NUL terminated) format. The screen must be in one of the CGA
- graphics modes (video modes 4-6).
-
- The following control codes are interpreted:
- 7 Bell beep
- 8 Backspace non-destructive backspace
- 9 Tab space over to the next tab stop
- 10 Linefeed move cursor down one line, scrolling as needed
- 12 Formfeed clear screen and home cursor
- 13 Carriage Return home cursor on current line
-
- Redirection, if any, is ignored. Few windowing multitaskers will be able to
- keep the output from this service in a window.
-
- Service : CG_WHERE
-
- Module : CGA Graphics Services
-
- Compat : Clone
-
- Purpose : Gets the cursor position
-
- Parms:
- -------
- DH = row (1-25)
- DL = column (1-40/80)
-
- Description:
-
- The CG_WHERE service gets the cursor position. The screen must be in one of
- the CGA graphics modes (video modes 4-6).
-
- Redirection, if any, is ignored. Few windowing multitaskers will be able to
- keep the output from this service in a window.
-
- Service : DV_CHROUT
-
- Module : DOS Video Services
-
- Compat : DOS
-
- Purpose : Displays a character on the screen
-
- Parms:
- AL <-- character to display
-
- Description:
-
- The DV_CHROUT routine displays a character on the screen.
-
- The following control codes are interpreted:
- 7 Bell beep
- 8 Backspace non-destructive backspace
- 9 Tab space over to the next tab stop
- 10 Linefeed move cursor down one line, scrolling as needed
- 13 Carriage Return home cursor on current line
-
- Redirection, if any, is in effect. Text from this service may be redirected
- to any file or device. Pipes can also be used. Almost all windowing
- multitaskers will be able to keep the output from this service in a window.
-
-
-
-
- Service : DV_CLEOLN
-
- Module : DOS Video Services
-
- Compat : DOS (with ANSI)
-
- Purpose : Clears to the end of the line
-
- Parms:
- none
-
- Description:
-
- The DV_CLEOLN service clears from the current cursor position to the end of
- the current screen line, inclusive. It requires ANSI.
-
- Redirection, if any, is in effect. Text from this service may be redirected
- to any file or device. Pipes can also be used. Almost all windowing
- multitaskers will be able to keep the output from this service in a window.
-
- Service : DV_CLS
-
- Module : DOS Video Services
-
- Compat : DOS (with ANSI)
-
- Purpose : Clears the screen
-
- Parms:
- none
-
- Description:
-
- The DV_CLS service clears the screen and homes the cursor to the upper left
- corner. It requires ANSI.
-
- Redirection, if any, is in effect. Text from this service may be redirected
- to any file or device. Pipes can also be used. Almost all windowing
- multitaskers will be able to keep the output from this service in a window.
-
-
-
-
- Service : DV_COLOR
-
- Module : DOS Video Services
-
- Compat : DOS (with ANSI)
-
- Purpose : Sets the default text color
-
- Parms:
- AL <-- default color
-
- Description:
-
- The DV_COLOR service sets the default text color. A color/attribute table is
- given in the ASMWIZ.DOC file. In general, however, the background is in the
- high nybble and ranges 0-7 in text modes, 0 in graphics modes; the foreground
- is in the low nybble and ranges 0-7 in text modes, 0-x in graphics modes.
-
- Redirection, if any, is in effect. Text from this service may be redirected
- to any file or device. Pipes can also be used. Almost all windowing
- multitaskers will be able to keep the output from this service in a window.
-
- Service : DV_CRLF
-
- Module : DOS Video Services
-
- Compat : DOS
-
- Purpose : Displays a <CR><LF> (carriage return and linefeed)
-
- Parms:
- none
-
- Description:
-
- The DV_CRLF routine displays a carriage return and linefeed on the screen.
-
- Redirection, if any, is in effect. Text from this service may be redirected
- to any file or device. Pipes can also be used. Almost all windowing
- multitaskers will be able to keep the output from this service in a window.
-
-
-
-
- Service : DV_DELLINE
-
- Module : DOS Video Services
-
- Compat : DOS (with extended ANSI)
-
- Purpose : Deletes the current screen row
-
- Parms:
- none
-
- Description:
-
- The DV_DELLINE service deletes the row on which the cursor is placed. Any
- rows beneath it are moved up and the bottom line of the screen is cleared to
- a row of spaces in the current screen colors.
-
- This service is only available under extended versions of the ANSI driver,
- such as NANSI.SYS and ZANSI.SYS. It requires the use of an ANSI code which
- is not implemented in the standard IBM subset of the ANSI protocol.
-
- Redirection, if any, is in effect. Text from this service may be redirected
- to any file or device. Pipes can also be used. Almost all windowing
- multitaskers will be able to keep the output from this service in a window.
-
- Service : DV_INSLINE
-
- Module : DOS Video Services
-
- Compat : DOS (with extended ANSI)
-
- Purpose : Inserts a line at the current screen row
-
- Parms:
- none
-
- Description:
-
- The DV_INSLINE service inserts a row at the current cursor location. Any
- rows beneath it are moved down and the new line screen is cleared to a row of
- spaces in the current screen colors.
-
- This service is only available under extended versions of the ANSI driver,
- such as NANSI.SYS and ZANSI.SYS. It requires the use of an ANSI code which
- is not implemented in the standard IBM subset of the ANSI protocol.
-
- Redirection, if any, is in effect. Text from this service may be redirected
- to any file or device. Pipes can also be used. Almost all windowing
- multitaskers will be able to keep the output from this service in a window.
-
-
-
-
- Service : DV_LOCATE
-
- Module : DOS Video Services
-
- Compat : DOS (with ANSI)
-
- Purpose : Sets the cursor position
-
- Parms:
- DH <-- row (1-25)
- DL <-- column (1-40/80)
-
- Description:
-
- The DV_LOCATE service sets the cursor position. It requires ANSI.
-
- Redirection, if any, is in effect. Text from this service may be redirected
- to any file or device. Pipes can also be used. Almost all windowing
- multitaskers will be able to keep the output from this service in a window.
-
- Service : DV_MODE
-
- Module : DOS Video Services
-
- Compat : DOS (with ANSI)
-
- Purpose : Sets the screen mode
-
- Parms:
- AL <-- screen mode (0-6)
-
- Description:
-
- The DV_MODE routine sets the screen mode. This may be any of the following:
-
- Mode Resolu. Type Colr Use Adapter(s)
-
- 0 40x25 b&w 16 text CGA, EGA, VGA
- 1 40x25 color 16 text CGA, EGA, VGA
- 2 80x25 b&w 16 text CGA, EGA, VGA
- def- 3 80x25 color 16 text CGA, EGA, VGA
- 4 320x200 color 4 graphics CGA, EGA, VGA
- 5 320x200 b&w 4 graphics CGA, EGA, VGA
- 6 640x200 color 2 graphics CGA, EGA, VGA
-
- Additional modes may be available, depending on the ANSI driver used. See
- description of the BV_MODE service for information on these additional modes.
-
- Redirection, if any, is in effect. Text from this service may be redirected
- to any file or device. Pipes can also be used. Almost all windowing
- multitaskers will be able to keep the output from this service in a window.
-
- Service : DV_STROUT
-
- Module : DOS Video Services
-
- Compat : DOS
-
- Purpose : Displays a string on the screen
-
- Parms:
- DS:DX <-- ptr to the string to display
-
- Description:
-
- The DV_STROUT routine displays a string on the screen. The string must be in
- ASCIIZ (NUL terminated) format.
-
- The following control codes are interpreted:
- 7 Bell beep
- 8 Backspace non-destructive backspace
- 9 Tab space over to the next tab stop
- 10 Linefeed move cursor down one line, scrolling as needed
- 13 Carriage Return home cursor on current line
-
- Redirection, if any, is in effect. Text from this service may be redirected
- to any file or device. Pipes can also be used. Almost all windowing
- multitaskers will be able to keep the output from this service in a window.
-
- Service : MA_ADD32
-
- Module : Math (32-bit) Services
-
- Compat : Any
-
- Purpose : Adds two unsigned long integers
-
- Parms:
- DS:SI <-- first operand
- DS:SI+4 <-- second operand
- -------
- DS:SI+8 = result
-
- Description:
-
- The MA_ADD32 routine adds two unsigned long integers, giving a result of the
- same type. Since such numbers are rather bulky, they are passed through a
- buffer rather than through registers. The numbers in the buffer are stored
- in normal Intel format, least significant word to most significant word. The
- buffer should look something like this:
-
- FIRST32 dd ?
- SECOND32 dd ?
- RESULT32 dd ?
-
- Service : MA_DIV32
-
- Module : Math (32-bit) Services
-
- Compat : Any
-
- Purpose : Divides an unsigned "near very long" integer by a long integer
-
- Parms:
- DS:SI <-- dividend (64 bits: high bit must be zero)
- DS:SI+8 <-- divisor (unsigned long integer)
- -------
- DS:SI+12 = quotient (unsigned long integer)
- DS:SI+16 = remainder (unsigned long integer)
-
- Description:
-
- The MA_DIV32 routine divides an unsigned 63-bit integer by an unsigned long
- integer, giving a quotient and remainder.
-
- Since the numbers are rather bulky, they are passed through a buffer rather
- than through registers. The numbers in the buffer are stored in normal Intel
- format, least significant word to most significant word. The buffer should
- look something like this:
-
- FIRST64 dq ?
- SECOND32 dd ?
- RESULT32 dd ?
- REMAIN32 dd ?
-
- Note that since this service uses unsigned numbers, it is possible to use it
- to divide a 32-bit quantity by another 32-bit quantity, giving a 32-bit
- result. In that case, just convert the 32-bit dividend to 64 bits by making
- the upper 32 bits zero. The BC_LONG2ASC service uses this approach in the
- course of its work.
-
- Service : MA_MUL32
-
- Module : Math (32-bit) Services
-
- Compat : Any
-
- Purpose : Multiplies two unsigned long integers
-
- Parms:
- DS:SI <-- first operand
- DS:SI+4 <-- second operand
- -------
- DS:SI+8 = result (64 bits)
-
- Description:
-
- The MA_MUL32 routine multiplies two unsigned long integers, giving a result
- of a type that might be called an unsigned very long integer (64 bits).
- Since such numbers are rather bulky, they are passed through a buffer rather
- than through registers. The numbers in the buffer are stored in normal Intel
- format, least significant word to most significant word. The buffer should
- look something like this:
-
- FIRST32 dd ?
- SECOND32 dd ?
- RESULT64 dq ?
-
- Note that since this service uses unsigned numbers, it is possible to use it
- to multiply a 32-bit quantity by a 16-bit quantity, giving (maybe) a 32-bit
- result. In that case, just convert the 16-bit quantity to 32 bits by making
- the upper 16 bits zero; if the next-to-highest word of the result is nonzero,
- there was an overflow, and the result did not fit into 32 bits.
-
- Service : MA_SUB32
-
- Module : Math (32-bit) Services
-
- Compat : Any
-
- Purpose : Subtracts one unsigned long integer from another
-
- Parms:
- DS:SI <-- first operand
- DS:SI+4 <-- second operand
- -------
- DS:SI+8 = result
-
- Description:
-
- The MA_SUB32 routine subtracts one unsigned long integer from another, giving
- a result of the same type. Since such numbers are rather bulky, they are
- passed through a buffer rather than through registers. The numbers in the
- buffer are stored in normal Intel format, least significant word to most
- significant word. The buffer should look something like this:
-
- FIRST32 dd ?
- SECOND32 dd ?
- RESULT32 dd ?
-
- Service : MD_DELAY
-
- Module : Delay Services
-
- Compat : Clone
-
- Purpose : Delays for a number of 100ths of seconds
-
- Parms:
- CX <-- delay (0-32767)
-
- Description:
-
- The MD_DELAY service waits for a specified number of clock ticks. This is
- based on the timer system initialized by the MD_INIT service. Timer #0 is
- used by MD_DELAY, so you should avoid Timer #0 if you use MD_DELAY.
-
- If you use the 100th-second time services, it is vital that you initialize
- them with MD_INIT (at the start of your program) and terminate them with
- MD_DONE (at the end of your program).
-
- Since the system clock is maintained via the interrupt system, interrupts
- will be enabled for the duration of this service, to avoid an infinite delay.
-
- This service has been designed to accommodate multitaskers. If another task
- is in operation, the delay may be a trifle longer than expected, however.
-
-
-
-
- Service : MD_DONE
-
- Module : Delay Services
-
- Compat : Clone
-
- Purpose : Terminates the 100th-second timer handler
-
- Parms:
- none
-
- Description:
-
- The MD_DONE service terminates the 100th-second timer handler. The original
- timer interrupt is restored and the system clock is reset to 18.2 cycles per
- second, which is presumed to have been the original speed.
-
- If you use the 100th-second time services, it is vital that you initialize
- them with MD_INIT (at the start of your program) and terminate them with
- MD_DONE (at the end of your program).
-
- Service : MD_GETTIMER
-
- Module : Delay Services
-
- Compat : Clone
-
- Purpose : Gets one of the 100th-second countdown timers
-
- Parms:
- AL <-- timer number (0-3)
- -------
- CX = time count (0-65,534)
-
- Description:
-
- The MD_GETTIMER service gets the time remaining from one of the 100th-second
- countdown timers. The time returned will be in 200ths of seconds. It is
- expected that you will normally just compare the result with zero to see if
- the countdown time has elapsed. See the MD_SETTIMER service for details.
-
- If you use the 100th-second time services, it is vital that you initialize
- them with MD_INIT (at the start of your program) and terminate them with
- MD_DONE (at the end of your program).
-
-
-
-
- Service : MD_INIT
-
- Module : Delay Services
-
- Compat : Clone
-
- Purpose : Initializes the 100th-second timer handler
-
- Parms:
- none
-
- Description:
-
- The MD_INIT service initializes the 100th-second timer handler. The system
- clock is reset to 200.27 cycles per second. The old timer interrupt is
- executed every 11th time through, so as to maintain the usual 18.2 cycles per
- second for the rest of the system.
-
- If you use the 100th-second time services, it is vital that you initialize
- them with MD_INIT (at the start of your program) and terminate them with
- MD_DONE (at the end of your program).
-
- The MD_INIT service provides up to four countdown timers which may be
- accessed by the MD_SETTIMER and MD_GETTIMER services. These countdown timers
- decrement their respective counts at a rate of 100 per second. The count is
- not allowed to go below zero.
-
- Service : MD_SETTIMER
-
- Module : Delay Services
-
- Compat : Clone
-
- Purpose : Sets one of the 100th-second countdown timers
-
- Parms:
- AL <-- timer number (0-3)
- CX <-- time count (0-32,767)
-
- Description:
-
- The MD_SETTIMER service sets one of the 100th-second countdown timers going.
- The time will be decremented once every 100th of a second until it reaches
- zero. This is useful for occasions where you need to do something within a
- specified amount of time. For instance, in a communications program you
- might want a "receive character" routine to keep looking for a character for
- up to a second before returning a "time out" error.
-
- Up to four countdown timers are available. Timer 0 is used by MD_DELAY, so
- don't access it if you wish to use the MD_DELAY service. Timer 1 is reserved
- for the upcoming MU_MUSIC music service, so don't use it if you would like to
- add music to a future program. Timers 2-3 are always available for your own
- use.
-
- The time count is restricted to a maximum of 32,767 because it is doubled
- internally. The timer runs at 200 cycles per second to improve accuracy and
- make it easy to maintain the old 18.2 cycles per second for the system.
-
- If you use the 100th-second time services, it is vital that you initialize
- them with MD_INIT (at the start of your program) and terminate them with
- MD_DONE (at the end of your program).
-
-
-
-
- Service : MD_TICK
-
- Module : Delay Services
-
- Compat : Clone
-
- Purpose : Delays for a number of clock ticks (18ths of seconds)
-
- Parms:
- CX <-- delay (0-65535)
-
- Description:
-
- The MD_TICK service waits for a specified number of clock ticks. This is
- based on the system clock. There are about 18.2 ticks per second, so the
- delay for one tick is approximately 1/18th second.
-
- Since the system clock is maintained via the interrupt system, interrupts
- will be enabled for the duration of this service, to avoid an infinite delay.
-
- This service has been designed to accommodate multitaskers. If another task
- is in operation, the delay may be a trifle longer than expected, however.
-
- Service : ME_HIGHOFS
-
- Module : Memory Services
-
- Compat : Any
-
- Purpose : Converts an address to have the lowest segment and highest offset
-
- Parms:
- DX:AX <-- segment:offset
- -------
- DX:AX = converted segment:offset
-
- Description:
-
- The ME_HIGHOFS service converts an address so that it has the highest
- possible offset and lowest possible segment. This allows you to work
- backwards from this address by up to 65,519 bytes without wrapping around
- within the segment, which is a convenience for reverse REP operations, for
- example. The resulting offset will be in the range FFF0h - FFFFh, unless the
- address is extremely low in memory, in which case the range may be lower.
-
-
-
-
- Service : ME_LOWOFS
-
- Module : Memory Services
-
- Compat : Any
-
- Purpose : Converts an address to have the highest segment and lowest offset
-
- Parms:
- DX:AX <-- segment:offset
- -------
- DX:AX = converted segment:offset
-
- Description:
-
- The ME_LOWOFS service converts an address so that it has the lowest possible
- offset and highest possible segment. This allows you to work forwards from
- this address by up to 65,519 bytes without wrapping around within the
- segment, which is a convenience for forward REP operations, for example. The
- resulting offset will be in the range 0000h - 000Fh.
-
- Service : ME_MOVE
-
- Module : Memory Services
-
- Compat : Any
-
- Purpose : Moves a block of data from one place to another
-
- Parms:
- DS:SI <-- source segment:offset
- ES:DI <-- destination segment:offset
- CX <-- bytes to move (0 - 65,519)
-
- Description:
-
- The ME_MOVE service moves data from one place to another. It automatically
- handles overlaps, so the data will always be copied correctly.
-
- The reason ME_MOVE can only handle up to 65,519 characters rather than a full
- 65,535 is because it uses the ME_LOWOFS and ME_HIGHOFS services rather than
- recalculating and re-normalizing the addresses every time. The loss of a few
- bytes' range is, in most cases, an acceptable price for the vastly increased
- speed. If you need greater range, calling ME_MOVE more than once may be a
- bit of a nuisance, but it will still be considerably faster than the
- recalculation approach.
-
- Service : MI_BOOT
-
- Module : Miscellaneous Services
-
- Compat : Clone
-
- Purpose : Reboots the computer (warm boot)
-
- Parms:
- none
-
- Description:
-
- The MI_BOOT service restarts the computer by performing a warm boot.
-
- I'd provide a "cold boot" service as well, but I've found that doing a cold
- boot is liable to lock up many clones, including some Compaq models. The
- warm boot, however, has worked on every clone to which I've had access.
-
- This service may be accessed by JMP instead of CALL if you prefer. It really
- doesn't matter, since the stack is reset and control is returned to the
- system during the boot process. The JMP is trivially more efficient, though.
-
- Service : MI_MATCHFILE
-
- Module : Miscellaneous Services
-
- Compat : Any
-
- Purpose : Determines whether a filename matches a given pattern
-
- Parms:
- DS:SI <-- ptr to pattern (which may contain wildcards)
- ES:DI <-- ptr to filename (which may not contain drive or path specs)
- -------
- flags: ZF = the filename matches the pattern
- NZ = the filename does not match the pattern
-
- Description:
-
- The MI_MATCHFILE routine compares a filename with a specified pattern. The
- pattern may contain the "*" or "?" wildcards. This pattern-matching service
- works just the way DOS does. It can be used for finding a desired set of
- matches within a list of known files, for excluding an unwanted set of files
- from a directory list, and so forth.
-
- The DOS "DEL" command is used as a basis for this matcher. Thus, using "*"
- as a pattern is equivalent to using "*.", not "*.*" as "DIR" would interpret
- the pattern. The matcher uses the more conservative algorithm in an attempt
- to avoid excessive broadness in its matches. If you prefer otherwise, simply
- have your program replace the "*" pattern with "*.*" before calling this
- service.
-
- Service : MI_PARSE
-
- Module : Miscellaneous Services
-
- Compat : DOS
-
- Purpose : Parses a command line into file specifications and options
-
- Parms:
- DS:SI <-- ptr to command line (for COM files, is CS:0080h)
- ES:DI <-- ptr to filename buffer (recommend 128 bytes)
- ES:BX <-- ptr to option buffer (recommend 128 bytes)
- AL <-- switch character (normally "/" for DOS)
- -------
- AH = number of options
- AL = number of filenames
-
- Description:
-
- The MI_PARSE routine takes the information passed to your program on the
- command line and parses it into filenames and options.
-
- The command line is everything that comes after your program name when the
- user types in the name of your program. It is generally used for passing
- filenames and options to your program. DOS itself is rather crude about such
- matters and simply passes the original input to your program, after removing
- the name of the program itself and any piping or redirection which may have
- been done.
-
- This routine assumes that anything which isn't an option is a filename. Of
- course, this need not be true, but it's a convenient fiction for separating
- the options from the rest of the information.
-
- Options may be delimited by the character of your choice. DOS normally uses
- "/" and assumes "\" is used for specifying paths. Many people prefer the
- *nix convention of "-" for switches and "/" for specifying paths, however, so
- this routine allows for that possibility. DOS will recognize "/" as being
- the same as "\" in any DOS interrupt that accepts paths, so this works out
- fairly well, since *nix folks are accustomed to using "/" as a path
- delimiter. It's somewhat appalling that Microsoft/IBM deliberately chose to
- avoid the *nix conventions, but it is certainly handy that DOS will (more or
- less) accept such usage internally, if not at the command level. Note that
- use of "-" as a switch character means that you will not be able to access
- any files which contain "-" characters in the filename. This is rarely a
- problem, but it can happen.
-
- The two parameter tables, filenames and options, will consist of strings in
- their original order in the command line. Each string will be terminated by
- a null character, in keeping with C usage. The number of strings in each
- parameter table is returned by MI_PARSE in one or another half of the AX
- register, as specified in the "Parms" list, above.
-
- You will normally specify the offset of the command-line within the PSP for
- this service. For COM-format files, this is CS:0080h. For EXE-format files,
- use the initial CS value with the same 0080h offset. With later DOS
- versions, it is possible to ask DOS to give you the segment of the PSP, but
- since many people only have earlier DOS versions, that is not necessarily a
- good idea. Stick with the original CS, if you know it, and you'll be fine.
-
- Service : MI_RANDOM
-
- Module : Miscellaneous Services
-
- Compat : Any
-
- Purpose : Generates a pseudo-random number
-
- Parms:
- DX <-- range of the desired pseudo-random number (1-4000)
- -------
- AX = pseudo-random number (0 to DX - 1)
-
- Description:
-
- The MI_RANDOM service generates pseudo-random numbers within a desired range.
-
- A linear congruential method is used to generate the numbers. The algorithm
- was derived from the book "How to Solve it by Computer", by R. G. Dromey
- (Prentiss-Hall).
-
- See also the MI_RANDOMIZE service, which is used to initialize the random
- number generator.
-
-
-
-
- Service : MI_RANDOMIZE
-
- Module : Miscellaneous Services
-
- Compat : Any / Clone
-
- Purpose : Initializes the pseudo-random number generator
-
- Parms:
- AX <-- random number seed or 0FFFFh
-
- Description:
-
- The MI_RANDOMIZE routine initializes the MI_RANDOM random number generator
- service. You may specify your own random number seed (in which case this
- routine is compatible with any PC) or use 0FFFFh for the routine to pick its
- own seed (in which case this routine is only compatible with clones).
-
- If you specify 0FFFFh, the random number seed is read directly from the timer
- chip's countdown tick, giving a quite adequately random initial seed value.
-
- Specifying your own seed may be done to maximize compatibility with the most
- machines. In that case, you will probably want to get a seed value from the
- DOS time service, using the seconds value. Use of the "hundredths of
- seconds" value is not advised, as it is always zero on some machines.
-
- You might also want to specify your own seed during debugging, to assure you
- of a reproducible set of pseudo-random numbers. The same stream of numbers
- will always be generated from the same seed value.
-
- Service : MI_SCANENV
-
- Module : Miscellaneous Services
-
- Compat : DOS
-
- Purpose : Scans the DOS environment (or similar table) for a specified string
-
- Parms:
- DS:SI <-- ptr to DOS environment
- ES:DI <-- ptr to string for which to seek
- -------
- DS:SI = ptr to parm value (if NC; CY is set if not found)
-
- Description:
-
- The MI_SCANENV routine scans the DOS environment for a specified string and
- returns the value of the parameter which matches that string. If there is no
- matching parameter, the carry flag is set.
-
- You may also use this routine for scanning your own tables if you format them
- like the DOS environment: each entry of the table is an ASCIIZ string which
- contains a parameter name and parameter value, seperated by an "equals" sign.
- The end of the table is marked by an additional NUL character. Matching is
- case-sensitive ("comspec" will not match "COMSPEC").
-
- The segment of the environment is stored at offset 002Ch within the PSP. For
- COM files, the segment is at CS:[002Ch] (see notes under MI_PARSE). Since
- parameters in the environment are stored in uppercase, you should make sure
- that the string for which you seek is also capitalized.
-
- The resulting match, if any, will be pointed to by DS:SI on exit. It is the
- value of the parameter, not the parameter name, which is returned.
-
-
- Example:
- MOV DS,DS:[002Ch] ; assumes CS = DS = ES (COM file)
- XOR SI,SI
- MOV ES,OFFSET TOFIND
- CALL MI_SCANENV
- JC NOTFOUND
- MOV DX,SI
- CALL DV_STROUT
- CALL DV_CRLF
- (etc)
- NOTFOUND:
- (etc)
- TOFIND DB "PATH",0
-
- This example will search the environment for the "PATH" parameter. If a PATH
- exists, it will be displayed, looking perhaps like "D:\;C:\bin" (without the
- quotes).
-
- Service : MO_HIDECURSOR
-
- Module : Mouse Services
-
- Compat : BIOS (Microsoft-type mouse driver)
-
- Purpose : Hides the mouse cursor
-
- Parms:
- none
-
- Description:
-
- The MO_HIDECURSOR service hides the mouse cursor. After using this service,
- the mouse cursor will not be visible, although it will still be there.
-
- This is a somewhat peculiar service. If you use it more than once, it will
- take more than one application of MO_SHOWCURSOR before the cursor actually
- reappears. The mouse driver keeps a "level of invisibility" counter rather
- than simply turning the cursor on and off.
-
-
-
-
- Service : MO_INIT
-
- Module : Mouse Services
-
- Compat : BIOS (Microsoft-type mouse driver)
-
- Purpose : Initialize mouse, if any, and get info about it
-
- Parms:
- -------
- AL = number of buttons (0-3)
-
- Description:
-
- The MO_INIT service initializes the mouse driver and returns the number of
- buttons on the mouse. If no mouse is available, the number of buttons will
- be zero. Otherwise, you can expect 2-3 buttons.
-
- The Microsoft mouse is somewhat unusual in that it has only two buttons.
- Most compatible mice have three. The ASMWIZ mouse services will work with
- either, but will ignore the middle button of three-button mice.
-
- Service : MO_LOCATE
-
- Module : Mouse Services
-
- Compat : BIOS (Microsoft-type mouse driver)
-
- Purpose : Sets the mouse cursor location
-
- Parms:
- DH <-- row (1-25)
- DL <-- column (1-80)
-
- Description:
-
- The MO_LOCATE service sets the mouse cursor position. It works whether or
- not the mouse cursor is visible.
-
- Normally, the mouse driver uses coordinates based on a 640x200 virtual
- screen. In order to make it easier to handle the mouse for text, this
- service automatically converts from an 80x25 format.
-
-
-
-
- Service : MO_RANGE
-
- Module : Mouse Services
-
- Compat : BIOS (Microsoft-type mouse driver)
-
- Purpose : Sets the mouse cursor range
-
- Parms:
- CH <-- top row (1-25)
- CL <-- left column (1-80)
- DH <-- bottom row (1-25)
- DL <-- right column (1-80)
-
- Description:
-
- The MO_RANGE service sets the mouse cursor range. The mouse cursor will be
- constrained to the specified area of the screen.
-
- Normally, the mouse driver uses coordinates based on a 640x200 virtual
- screen. In order to make it easier to handle the mouse for text, this
- service automatically converts from an 80x25 format.
-
- Service : MO_SHOWCURSOR
-
- Module : Mouse Services
-
- Compat : BIOS (Microsoft-type mouse driver)
-
- Purpose : Shows the mouse cursor
-
- Parms:
- none
-
- Description:
-
- The MO_SHOWCURSOR service shows the mouse cursor. After using this service,
- the mouse cursor will (probably) be visible.
-
- See the description of the MO_HIDECURSOR service for details on that
- "probably" caution!
-
-
-
-
- Service : MO_WHERE
-
- Module : Mouse Services
-
- Compat : BIOS (Microsoft-type mouse driver)
-
- Purpose : Gets the mouse cursor location
-
- Parms:
- -------
- AH = right mouse button (0 if not pressed, 1 if pressed)
- AL = left mouse button (0 if not pressed, 1 if pressed)
- DH = row (1-25)
- DL = column (1-80)
-
- Description:
-
- The MO_WHERE service gets the mouse cursor position and current button
- status. It works whether or not the mouse cursor is visible.
-
- Normally, the mouse driver uses coordinates based on a 640x200 virtual
- screen. In order to make it easier to handle the mouse for text, this
- service automatically converts to an 80x25 format.
-
- Service : MU_SOUND
-
- Module : Sound and Music Services
-
- Compat : Clone
-
- Purpose : Produces a sound of the desired frequency and duration
-
- Parms:
- AX <-- frequency of the sound, in cycles per second (Hertz)
- DX <-- duration of the sound (in 1/18th seconds)
-
- Description:
-
- The MU_SOUND routine produces a sound of the specified frequency (about
- 50-4000 is useful) and duration (in 18ths of seconds).
-
- If you are interested in producing music using this service, the following
- table may prove of some use. You can move down an octave by halving the
- frequency for a given note (which can be efficiently accomplished using the
- SHR or SHift Right assembly-language operation). About seven octaves are
- available on the usual PC compatible.
-
- Note Frequency (highest octave)
- ===== =========
- A 3520
- A#,B- 3714
- B 3952
- C 4186
- C#,D- 4434
- D 4698
- D#,E- 4978
- E 5274
- F 5588
- F#,G- 5920
- G 6272
- G#,A- 6644
-
- Service : MV_CHROUT
-
- Module : Machine-level Video Services
-
- Compat : Clone
-
- Purpose : Displays a character on the screen
-
- Parms:
- AL <-- character to display
-
- Description:
-
- The MV_CHROUT routine displays a character on the screen. The screen must be
- in one of the text modes (video modes 0-3, 7).
-
- The following control codes are interpreted:
- 7 Bell beep
- 8 Backspace non-destructive backspace
- 9 Tab space over to the next tab stop
- 10 Linefeed move cursor down one line, scrolling as needed
- 12 Formfeed clear screen and home cursor
- 13 Carriage Return home cursor on current line
-
- Redirection, if any, is ignored. Few windowing multitaskers will be able to
- keep the output from this service in a window.
-
-
-
-
- Service : MV_CLEOLN
-
- Module : Machine-level Video Services
-
- Compat : Clone
-
- Purpose : Clears to the end of the line
-
- Parms:
- none
-
- Description:
-
- The MV_CLEOLN service clears from the current cursor position to the end of
- the current screen line, inclusive. The screen must be in one of the text
- modes (video modes 0-3, 7).
-
- Redirection, if any, is ignored. Few windowing multitaskers will be able to
- keep the output from this service in a window.
-
- Service : MV_CLS
-
- Module : Machine-level Video Services
-
- Compat : Clone
-
- Purpose : Clears the screen
-
- Parms:
- none
-
- Description:
-
- The MV_CLS service clears the screen and homes the cursor to the upper left
- corner. The screen must be in one of the text modes (video modes 0-3, 7).
-
- Redirection, if any, is ignored. Few windowing multitaskers will be able to
- keep the output from this service in a window.
-
-
-
-
- Service : MV_COLOR
-
- Module : Machine-level Video Services
-
- Compat : Clone
-
- Purpose : Sets the default text color
-
- Parms:
- AL <-- default color
-
- Description:
-
- The MV_COLOR service sets the default text color. A color/attribute table is
- given in the ASMWIZ.DOC file. In general, however, the background is in the
- high nybble and ranges 0-7; the foreground is in the low nybble and also
- ranges 0-7. For bright, add 8 to the foreground; for blinking, add 8 to the
- background.
-
- Redirection, if any, is ignored. Few windowing multitaskers will be able to
- keep the output from this service in a window.
-
- Service : MV_CRLF
-
- Module : Machine-level Video Services
-
- Compat : Clone
-
- Purpose : Displays a <CR><LF> (carriage return and linefeed)
-
- Parms:
- none
-
- Description:
-
- The MV_CRLF routine displays a carriage return and linefeed on the screen.
- The screen must be in one of the text modes (video modes 0-3, 7).
-
- Redirection, if any, is ignored. Few windowing multitaskers will be able to
- keep the output from this service in a window.
-
-
-
-
- Service : MV_DELCHR
-
- Module : Machine-level Video Services
-
- Compat : Clone
-
- Purpose : Deletes the character at the cursor
-
- Parms:
- none
-
- Description:
-
- The MV_DELCHR service deletes the character on which the cursor is placed.
- Any characters to the right of it are moved left and the rightmost column of
- the screen is cleared to a space in the current screen colors.
-
- Redirection, if any, is ignored. Few windowing multitaskers will be able to
- keep the output from this service in a window.
-
- Service : MV_DELLINE
-
- Module : Machine-level Video Services
-
- Compat : Clone
-
- Purpose : Deletes the current screen row
-
- Parms:
- none
-
- Description:
-
- The MV_DELLINE service deletes the row on which the cursor is placed. Any
- rows beneath it are moved up and the bottom line of the screen is cleared to
- a row of spaces in the current screen colors.
-
- Redirection, if any, is ignored. Few windowing multitaskers will be able to
- keep the output from this service in a window.
-
-
-
-
- Service : MV_GETCOLOR
-
- Module : Machine-level Video Services
-
- Compat : Clone
-
- Purpose : Gets the default text color
-
- Parms:
- -------
- AL = default color
-
- Description:
-
- The MV_GETCOLOR service gets the default text color. A color/attribute table
- is given in the ASMWIZ.DOC file. In general, however, the background is in
- the high nybble and ranges 0-7; the foreground is in the low nybble and also
- ranges 0-7.
-
- Redirection, if any, is ignored. Few windowing multitaskers will be able to
- keep the output from this service in a window.
-
- Service : MV_HIDECURSOR
-
- Module : Machine-level Video Services
-
- Compat : Clone
-
- Purpose : Hides the cursor
-
- Parms:
- none
-
- Description:
-
- The MV_HIDECURSOR service hides the cursor, making it invisible. This does
- not affect normal cursor operation.
-
- Redirection, if any, is ignored. Few windowing multitaskers will be able to
- keep the output from this service in a window.
-
-
-
-
- Service : MV_INIT
-
- Module : Machine-level Video Services
-
- Compat : Clone
-
- Purpose : Initializes the Machine-level Video Services
-
- Parms:
- none
-
- Description:
-
- The MV_INIT routine initializes the Machine-level Graphics Services. It
- should be used once in your program, before any other Machine-level Graphics
- Services are called.
-
- Redirection, if any, is ignored. Few windowing multitaskers will be able to
- keep the output from this service in a window.
-
- Service : MV_INSCHR
-
- Module : Machine-level Video Services
-
- Compat : Clone
-
- Purpose : Inserts a space at the cursor position
-
- Parms:
- none
-
- Description:
-
- The MV_INSCHR service inserts a space at the current cursor location. Any
- characters to the right of it are moved right and a space is inserted in the
- current screen colors.
-
- Redirection, if any, is ignored. Few windowing multitaskers will be able to
- keep the output from this service in a window.
-
-
-
-
- Service : MV_INSLINE
-
- Module : Machine-level Video Services
-
- Compat : Clone
-
- Purpose : Inserts a line at the current screen row
-
- Parms:
- none
-
- Description:
-
- The MV_INSLINE service inserts a row at the current cursor location. Any
- rows beneath it are moved down and the new line screen is cleared to a row of
- spaces in the current screen colors.
-
- Redirection, if any, is ignored. Few windowing multitaskers will be able to
- keep the output from this service in a window.
-
- Service : MV_LOCATE
-
- Module : Machine-level Video Services
-
- Compat : Clone
-
- Purpose : Sets the cursor position
-
- Parms:
- DH <-- row (1-25)
- DL <-- column (1-40/80)
-
- Description:
-
- The MV_LOCATE service sets the cursor position. The screen must be in one of
- the text modes (video modes 0-3, 7).
-
- Redirection, if any, is ignored. Few windowing multitaskers will be able to
- keep the output from this service in a window.
-
-
-
-
- Service : MV_MODE
-
- Module : Machine-level Video Services
-
- Compat : Clone
-
- Purpose : Sets the screen mode
-
- Parms:
- AL <-- screen mode (0-3, 7)
-
- Description:
-
- The MV_MODE routine sets the screen mode. This may be any of the following:
-
- Mode Resolu. Type Colr Use Adapter(s)
-
- 0 40x25 b&w 16 text CGA, EGA, VGA
- 1 40x25 color 16 text CGA, EGA, VGA
- 2 80x25 b&w 16 text CGA, EGA, VGA
- 3 80x25 color 16 text CGA, EGA, VGA
- 7 80x25 b&w - text MDA, EGA, VGA
-
- Redirection, if any, is ignored. Few windowing multitaskers will be able to
- keep the output from this service in a window.
-
- Service : MV_POPUP
-
- Module : Machine-level Video Services
-
- Compat : Clone
-
- Purpose : Displays a pop-up window on the screen
-
- Parms:
- DS:DX <-- pointer to parameter list
-
- Description:
-
- The MV_POPUP service displays a pop-up window on the screen. A variety of
- frames is available for the window. Titles are optional and will be left-
- justified in the top bar of the window if supplied.
-
- Frame types are as follows:
-
- 0 none (blank)
- 1 single lines
- 2 double lines
- 3 single horizontal lines, double vertical lines
- 4 double horizontal lines, single vertical lines
-
- The parameter list should look like this:
-
- Y1 db ? ; top row of window
- X1 db ? ; left column of window
- Y2 db ? ; bottom row of window
- X2 db ? ; right column of window
- FRAMETYPE db ? ; frame type
- FRAMECOLOR db ? ; frame color
- TITLE dw ? ; offset (from DS:) of ASCIIZ title
- ; use 0FFFFh instead if no title is desired
-
- Redirection, if any, is ignored. Few windowing multitaskers will be able to
- keep the output from this service in a window.
-
- Service : MV_SHOWCURSOR
-
- Module : Machine-level Video Services
-
- Compat : Clone
-
- Purpose : Shows the cursor
-
- Parms:
- none
-
- Description:
-
- The MV_SHOWCURSOR service shows the cursor, making it visible. NOTE: This
- service may change the cursor shape if used before MV_HIDECURSOR.
-
- Redirection, if any, is ignored. Few windowing multitaskers will be able to
- keep the output from this service in a window.
-
-
-
-
- Service : MV_STROUT
-
- Module : Machine-level Video Services
-
- Compat : Clone
-
- Purpose : Displays a string on the screen
-
- Parms:
- DS:DX <-- ptr to the string to display
-
- Description:
-
- The MV_STROUT routine displays a string on the screen. The string must be in
- ASCIIZ (NUL terminated) format. The screen must be in one of the text modes
- (video modes 0-3, 7).
-
- The following control codes are interpreted:
- 7 Bell beep
- 8 Backspace non-destructive backspace
- 9 Tab space over to the next tab stop
- 10 Linefeed move cursor down one line, scrolling as needed
- 12 Formfeed clear screen and home cursor
- 13 Carriage Return home cursor on current line
-
- Redirection, if any, is ignored. Few windowing multitaskers will be able to
- keep the output from this service in a window.
-
- Service : MV_WHERE
-
- Module : Machine-level Video Services
-
- Compat : Clone
-
- Purpose : Gets the cursor position
-
- Parms:
- -------
- DH = row (1-25)
- DL = column (1-40/80)
-
- Description:
-
- The MV_WHERE service gets the cursor position. The screen must be in one of
- the text modes (video modes 0-3, 7).
-
- Redirection, if any, is ignored. Few windowing multitaskers will be able to
- keep the output from this service in a window.
-
- Service : S0_COMPARE
-
- Module : String Services
-
- Compat : Any
-
- Purpose : Compares two strings
-
- Parms:
- DS:SI <-- ptr to first string
- ES:DI <-- ptr to second string
- -------
- Flags = ZF if equal, NZ if not equal
- Flags = CY if first < second, NC if first >= second
-
- Description:
-
- The S0_COMPARE service compares two strings. The carry flag and zero flag
- are set as you might expect for a comparison operation.
-
- Strings must be in ASCIIZ form (NUL terminated).
-
-
-
-
- Service : S0_DUPE
-
- Module : String Services
-
- Compat : Any
-
- Purpose : Creates a string by duplicating a specified character
-
- Parms:
- AL <-- character to duplicate
- CX <-- number of times to repeat the character
- ES:DI <-- ptr to result string
-
- Description:
-
- The S0_DUPE service creates a string by repeating a single character. The
- resulting string will be in ASCIIZ form (NUL terminated), so be sure to use a
- buffer large enough to hold both the string and its terminator.
-
- Service : S0_LEFT
-
- Module : String Services
-
- Compat : Any
-
- Purpose : Copies a section from the left of a string
-
- Parms:
- CX <-- number of characters to copy
- DS:SI <-- ptr to source string
- ES:DI <-- ptr to result string
-
- Description:
-
- The S0_LEFT service copies a specified number of characters from the left of
- one string into another. If you prefer, you can use the same address for
- both strings, allowing you to place the result back into the source buffer.
-
- Strings must be in ASCIIZ form (NUL terminated).
-
-
-
-
- Service : S0_LENGTH
-
- Module : String Services
-
- Compat : Any
-
- Purpose : Returns the length of a string
-
- Parms:
- DS:SI <-- ptr to source string
- -------
- CX = string length
-
- Description:
-
- The S0_LENGTH service returns the length of a string, not counting the NUL
- terminator.
-
- Strings must be in ASCIIZ form (NUL terminated).
-
- Service : S0_LOCASE
-
- Module : String Services
-
- Compat : Any
-
- Purpose : Converts a string to lowercase
-
- Parms:
- DS:SI <-- ptr to source string
- ES:DI <-- ptr to result string
-
- Description:
-
- The S0_LOCASE service converts all of the alphabetic characters in a string
- to lowercase. As well as American alphabet characters, the international
- alphabet characters supplied in the upper 128 IBM ASCII set are also
- translated.
-
- If you prefer, you can use the same address for both strings, allowing you to
- place the result back into the source buffer.
-
- Strings must be in ASCIIZ form (NUL terminated).
-
-
-
-
- Service : S0_MID
-
- Module : String Services
-
- Compat : Any
-
- Purpose : Copies a section of one string to another
-
- Parms:
- CX <-- number of characters to copy
- DX <-- where to start copying from (1-x)
- DS:SI <-- ptr to source string
- ES:DI <-- ptr to result string
-
- Description:
-
- The S0_MID service copies a specified number of characters one string to
- another, starting from a given location. If you prefer, you can use the same
- address for both strings, allowing you to place the result back into the
- source buffer.
-
- Strings must be in ASCIIZ form (NUL terminated).
-
- Service : S0_RIGHT
-
- Module : String Services
-
- Compat : Any
-
- Purpose : Copies a section from the right of a string
-
- Parms:
- CX <-- number of characters to copy
- DS:SI <-- ptr to source string
- ES:DI <-- ptr to result string
-
- Description:
-
- The S0_RIGHT service copies a specified number of characters from the right
- of one string into another. If you prefer, you can use the same address for
- both strings, allowing you to place the result back into the source buffer.
-
- Strings must be in ASCIIZ form (NUL terminated).
-
-
-
-
- Service : S0_TRIM
-
- Module : String Services
-
- Compat : Any
-
- Purpose : Trims the white space from either side of a string
-
- Parms:
- AL <-- trim code: set bit 0 for left, bit 1 for right
- DS:SI <-- ptr to source string
- ES:DI <-- ptr to result string
-
- Description:
-
- The S0_TRIM service removes the "white space" from either side (or both
- sides) of a string. Blanks and control characters are considered white
- space. This is a handy routine for normalizing user input and trimming the
- padding from fixed-length records, for instance.
-
- If you prefer, you can use the same address for both strings, allowing you to
- place the result back into the source buffer.
-
- Strings must be in ASCIIZ form (NUL terminated).
-
- Service : S0_UPCASE
-
- Module : String Services
-
- Compat : Any
-
- Purpose : Converts a string to uppercase
-
- Parms:
- DS:SI <-- ptr to source string
- ES:DI <-- ptr to result string
-
- Description:
-
- The S0_UPCASE service converts all of the alphabetic characters in a string
- to uppercase. As well as American alphabet characters, the international
- alphabet characters supplied in the upper 128 IBM ASCII set are also
- translated.
-
- If you prefer, you can use the same address for both strings, allowing you to
- place the result back into the source buffer.
-
- Strings must be in ASCIIZ form (NUL terminated).
-
- Service : TC_CHKSUM
-
- Module : Telecommunications Services
-
- Compat : Any
-
- Purpose : Calculates a checksum for Xmodem or Ymodem
-
- Parms:
- DS:SI <-- ptr to data block
- CX <-- length of data block (bytes)
- -------
- AX = checksum
-
- Description:
-
- The TC_CHKSUM routine calculates the checksum of a block of data. The
- algorithm used is compatible with the Xmodem and Ymodem file transfer
- protocols (use the lower byte of the checksum, AL, in that case).
-
-
-
-
- Service : TC_CRC
-
- Module : Telecommunications Services
-
- Compat : Any
-
- Purpose : Calculates a CRC for Xmodem or Ymodem
-
- Parms:
- DS:SI <-- ptr to data block
- CX <-- length of data block (bytes)
- -------
- AX = CRC
-
- Description:
-
- The TC_CRC routine calculates the CRC (Cyclical Redundancy Check) value of a
- block of data. The algorithm used is compatible with the Xmodem and Ymodem
- file transfer protocols.
-
- If you use TC_CRC for an outgoing Xmodem/Ymodem block, you need to add two
- nulls to the end of the block and increment CX accordingly. When you get the
- CRC, exchange AL and AH, then put AX where the nulls were, which will
- complete the outgoing packet. The reason for the swap is that Xmodem/Ymodem
- expect the CRC with the high byte followed by the low byte (non-Intel format).
-
- If you use TC_CRC for an incoming Xmodem/Ymodem block, leave the received CRC
- at the end of the data block and increment CX accordingly. If the calculated
- CRC comes out to zero, the received packet is fine.
-
- Service : TD_GETDATE
-
- Module : Time and Date Services
-
- Compat : DOS
-
- Purpose : Returns the date as a formatted string
-
- Parms:
- AL <-- 0 for 2-digit year, 1 for 4-digit year
- DS:DX <-- ptr to result buffer (minimum 11 bytes)
-
- Description:
-
- The TD_GETDATE service returns the current date as a formatted string. The
- formatting includes international date handling, in that the string is
- formatted in the appropriate manner for the country in which the computer is
- being operated. If a DOS version before 3.0 is used, the date delimiters are
- not guaranteed to be correct, but the month, day and year will be in the
- proper order regardless.
-
- The result is returned as an ASCIIZ (NUL terminated) string.
-
-
-
-
- Service : TD_GETTIME
-
- Module : Time and Date Services
-
- Compat : DOS
-
- Purpose : Returns the time as a formatted string
-
- Parms:
- DS:DX <-- ptr to result buffer (minimum 8 bytes)
-
- Description:
-
- The TD_GETTIME service returns the current time as a formatted string. The
- formatting includes international time handling, in that the string is
- formatted in the appropriate manner for the country in which the computer is
- being operated. If a DOS version before 3.0 is used, the time delimiters and
- 12/24-hour formatting are not guaranteed to be correct.
-
- If the hour is a single-digit number, it will be preceeded by a space. This
- is handy for keeping times in columns, but if you don't want the space there,
- chop it off by calling the S0_TRIM service.
-
- The result is returned as an ASCIIZ (NUL terminated) string.
-